<?php
namespace app\index\Controller;

use app\common\controller\Base;
use app\common\model\Sign as SignModel;
use think\facade\Session;
use think\facade\Request;
use think\Db;

class Sign extends Base
{


	//用户签到
	public function in()
	{
		$res['data'] = [];
		$uid = session::get('user_id');
		//halt($uid);
		$data[user_id] = $uid;
		$data['is_sign'] = 1;
		//$sig = Db::name('sign')->where('user_id',$uid)->find();
		$data['days'] = $sig['days']+1;
		$result = SignModel::create($data);
		if($result){
			$res['status'] = 0;
			return $res['data'];
		}
		
	}

    
	
}